package cn.zb.api.user.feign;

import cn.zb.api.user.vo.DeptVO;
import cn.zb.api.user.vo.RoleVO;
import cn.zb.api.user.vo.UserVO;
import cn.zb.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "oa-user")
public interface UserFeign {

    @PostMapping("user/roleMenu")
    Result<List<Integer>> roleMenu(@RequestParam String username);

    @PostMapping("user/roles")
    Result<List<RoleVO>> getAllRoles();

    @PostMapping("user/users")
    Result<List<UserVO>> getAllUsers(@RequestParam String deptID);
    @PostMapping("user/depts")
    Result<List<DeptVO>> getAllDepts();
}
